home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 …ember: Reference Library / Apple Developer Reference Library (December 1999) (Disk 1).iso / pc / technical documentation / develop / develop issue 18 / develop issue 18 code / hierarchical lists.sea / Hierarchical Lists / Src / WindowManager.c < prev   
MacBinary  |  1994-03-16  |  7.5 KB  |  [TEXT/KAHL]

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: MacBinary (archive/macBinary).

ConfidenceProgramDetectionMatch TypeSupport
66% dexvert Compact Compressed (Unix) (archive/compact) ext Supported
10% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, inited, Wed Mar 16 15:57:53 1994, modified Wed Mar 16 15:57:53 1994, creator Think C, type ASCII, 6554 bytes "WindowManager.c" , at 0x1a1a 888 bytes resource default (weak)
99% file data default
74% TrID Macintosh plain text (MacBinary) default
25% TrID MacBinary 2 default (weak)
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[KAHL]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 0f 57 69 6e 64 6f 77 | 4d 61 6e 61 67 65 72 2e |..Window|Manager.|
|00000010| 63 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |c.......|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4b 41 48 | 4c 01 00 00 00 00 00 00 |.TEXTKAH|L.......|
|00000050| 00 00 00 00 00 19 9a 00 | 00 03 78 a9 ad 23 51 a9 |........|..x..#Q.|
|00000060| ad 23 51 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |.#Q.....|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 2e 81 00 00 |........|........|
|00000080| 2f 2a 0d 20 2a 20 54 68 | 65 73 65 20 6d 61 79 20 |/*. * Th|ese may |
|00000090| 62 65 20 75 6e 2d 63 6f | 6d 6d 65 6e 74 65 64 20 |be un-co|mmented |
|000000a0| 66 6f 72 20 74 65 73 74 | 69 6e 67 2e 0d 20 2a 2f |for test|ing.. */|
|000000b0| 0d 2f 2f 20 23 64 65 66 | 69 6e 65 20 46 4f 52 43 |.// #def|ine FORC|
|000000c0| 45 5f 4d 4f 4e 4f 43 48 | 52 4f 4d 45 09 09 31 0d |E_MONOCH|ROME..1.|
|000000d0| 2f 2f 20 23 64 65 66 69 | 6e 65 20 46 4f 52 43 45 |// #defi|ne FORCE|
|000000e0| 5f 52 49 47 48 54 5f 4a | 55 53 54 49 46 59 09 31 |_RIGHT_J|USTIFY.1|
|000000f0| 0d 2f 2f 20 23 64 65 66 | 69 6e 65 20 46 4f 52 43 |.// #def|ine FORC|
|00000100| 45 5f 48 55 47 45 5f 46 | 4f 4e 54 09 09 31 0d 2f |E_HUGE_F|ONT..1./|
|00000110| 2f 20 23 64 65 66 69 6e | 65 20 4e 4f 5f 48 49 4c |/ #defin|e NO_HIL|
|00000120| 49 54 45 5f 53 45 4c 45 | 43 54 49 4f 4e 09 31 0d |ITE_SELE|CTION.1.|
|00000130| 2f 2a 09 09 09 09 09 09 | 09 09 09 57 69 6e 64 6f |/*......|...Windo|
|00000140| 77 4d 61 6e 61 67 65 72 | 2e 63 09 09 09 09 09 09 |wManager|.c......|
|00000150| 09 09 2a 2f 0d 2f 2a 0d | 20 2a 20 4c 69 73 74 20 |..*/./*.| * List |
|00000160| 49 6e 20 41 20 4c 69 73 | 74 20 53 61 6d 70 6c 65 |In A Lis|t Sample|
|00000170| 0d 20 2a 20 57 69 6e 64 | 6f 77 4d 61 6e 61 67 65 |. * Wind|owManage|
|00000180| 72 2e 63 0d 20 2a 20 43 | 6f 70 79 72 69 67 68 74 |r.c. * C|opyright|
|00000190| 20 a9 20 31 39 39 33 2d | 39 34 20 41 70 70 6c 65 | . 1993-|94 Apple|
|000001a0| 20 43 6f 6d 70 75 74 65 | 72 20 49 6e 63 2e 0d 20 | Compute|r Inc.. |
|000001b0| 2a 0d 20 2a 20 54 68 69 | 73 20 69 73 20 61 20 76 |*. * Thi|s is a v|
|000001c0| 65 72 79 20 6c 69 6d 69 | 74 65 64 20 65 78 61 6d |ery limi|ted exam|
|000001d0| 70 6c 65 20 6f 66 20 75 | 73 69 6e 67 20 74 68 65 |ple of u|sing the|
|000001e0| 20 54 77 69 73 74 44 6f | 77 6e 20 6c 69 73 74 20 | TwistDo|wn list |
|000001f0| 66 75 6e 63 74 69 6f 6e | 73 2e 20 49 6e 0d 20 2a |function|s. In. *|
|00000200| 20 70 61 72 74 69 63 75 | 6c 61 72 2c 20 6e 6f 74 | particu|lar, not|
|00000210| 65 20 74 68 61 74 20 74 | 68 65 72 65 20 69 73 20 |e that t|here is |
|00000220| 6e 6f 20 65 72 72 6f 72 | 20 68 61 6e 64 6c 69 6e |no error| handlin|
|00000230| 67 20 77 68 61 74 73 6f | 65 76 65 72 3a 20 69 66 |g whatso|ever: if|
|00000240| 20 74 68 65 20 64 69 73 | 6b 0d 20 2a 20 62 65 69 | the dis|k. * bei|
|00000250| 6e 67 20 65 78 61 6d 69 | 6e 65 64 20 68 61 73 20 |ng exami|ned has |
|00000260| 74 6f 6f 20 6d 61 6e 79 | 20 66 69 6c 65 73 20 6f |too many| files o|
|00000270| 72 20 66 6f 6c 64 65 72 | 73 2c 20 79 6f 75 72 20 |r folder|s, your |
|00000280| 70 72 6f 67 72 61 6d 20 | 77 69 6c 6c 20 63 72 61 |program |will cra|
|00000290| 73 68 2e 0d 20 2a 2f 0d | 23 69 6e 63 6c 75 64 65 |sh.. */.|#include|
|000002a0| 20 22 4c 69 73 74 49 6e | 41 4c 69 73 74 2e 68 22 | "ListIn|AList.h"|
|000002b0| 0d 23 69 6e 63 6c 75 64 | 65 20 3c 47 65 73 74 61 |.#includ|e <Gesta|
|000002c0| 6c 74 45 71 75 2e 68 3e | 0d 23 69 6e 63 6c 75 64 |ltEqu.h>|.#includ|
|000002d0| 65 20 3c 53 63 72 69 70 | 74 2e 68 3e 0d 2f 2a 0d |e <Scrip|t.h>./*.|
|000002e0| 20 2a 20 54 68 65 73 65 | 20 63 6f 6e 66 69 67 75 | * These| configu|
|000002f0| 72 65 20 74 68 65 20 77 | 69 6e 64 6f 77 20 66 6f |re the w|indow fo|
|00000300| 72 20 74 65 73 74 69 6e | 67 2e 0d 20 2a 2f 0d 23 |r testin|g.. */.#|
|00000310| 69 66 6e 64 65 66 20 46 | 4f 52 43 45 5f 4d 4f 4e |ifndef F|ORCE_MON|
|00000320| 4f 43 48 52 4f 4d 45 0d | 23 64 65 66 69 6e 65 20 |OCHROME.|#define |
|00000330| 46 4f 52 43 45 5f 4d 4f | 4e 4f 43 48 52 4f 4d 45 |FORCE_MO|NOCHROME|
|00000340| 09 30 0d 23 65 6e 64 69 | 66 0d 23 69 66 6e 64 65 |.0.#endi|f.#ifnde|
|00000350| 66 20 46 4f 52 43 45 5f | 52 49 47 48 54 5f 4a 55 |f FORCE_|RIGHT_JU|
|00000360| 53 54 49 46 59 0d 23 64 | 65 66 69 6e 65 09 46 4f |STIFY.#d|efine.FO|
|00000370| 52 43 45 5f 52 49 47 48 | 54 5f 4a 55 53 54 49 46 |RCE_RIGH|T_JUSTIF|
|00000380| 59 09 30 0d 23 65 6e 64 | 69 66 0d 23 69 66 6e 64 |Y.0.#end|if.#ifnd|
|00000390| 65 66 20 46 4f 52 43 45 | 5f 48 55 47 45 5f 46 4f |ef FORCE|_HUGE_FO|
|000003a0| 4e 54 0d 23 64 65 66 69 | 6e 65 20 46 4f 52 43 45 |NT.#defi|ne FORCE|
|000003b0| 5f 48 55 47 45 5f 46 4f | 4e 54 09 09 30 0d 23 65 |_HUGE_FO|NT..0.#e|
|000003c0| 6e 64 69 66 0d 23 69 66 | 6e 64 65 66 20 4e 4f 5f |ndif.#if|ndef NO_|
|000003d0| 48 49 4c 49 54 45 5f 53 | 45 4c 45 43 54 49 4f 4e |HILITE_S|ELECTION|
|000003e0| 0d 23 64 65 66 69 6e 65 | 20 4e 4f 5f 48 49 4c 49 |.#define| NO_HILI|
|000003f0| 54 45 5f 53 45 4c 45 43 | 54 49 4f 4e 09 30 0d 23 |TE_SELEC|TION.0.#|
|00000400| 65 6e 64 69 66 0d 0d 2f | 2a 0d 20 2a 20 4d 61 6b |endif../|*. * Mak|
|00000410| 65 48 46 53 42 72 6f 77 | 73 65 72 57 69 6e 64 6f |eHFSBrow|serWindo|
|00000420| 77 0d 20 2a 20 43 72 65 | 61 74 65 20 61 20 77 69 |w. * Cre|ate a wi|
|00000430| 6e 64 6f 77 2c 20 74 68 | 65 20 74 77 69 73 74 2d |ndow, th|e twist-|
|00000440| 64 6f 77 6e 20 6c 69 73 | 74 2c 20 61 6e 64 20 66 |down lis|t, and f|
|00000450| 69 6c 6c 20 69 74 20 77 | 69 74 68 20 66 69 6c 65 |ill it w|ith file|
|00000460| 20 6e 61 6d 65 73 2e 0d | 20 2a 2f 0d 76 6f 69 64 | names..| */.void|
|00000470| 0d 4d 61 6b 65 48 46 53 | 42 72 6f 77 73 65 72 57 |.MakeHFS|BrowserW|
|00000480| 69 6e 64 6f 77 28 76 6f | 69 64 29 0d 7b 0d 09 09 |indow(vo|id).{...|
|00000490| 72 65 67 69 73 74 65 72 | 20 42 72 6f 77 73 65 72 |register| Browser|
|000004a0| 50 74 72 09 09 09 09 62 | 72 6f 77 73 65 72 50 74 |Ptr....b|rowserPt|
|000004b0| 72 3b 0d 09 09 57 69 6e | 64 6f 77 50 74 72 09 09 |r;...Win|dowPtr..|
|000004c0| 09 09 09 09 74 68 65 57 | 69 6e 64 6f 77 3b 0d 09 |....theW|indow;..|
|000004d0| 09 52 65 63 74 09 09 09 | 09 09 09 09 76 69 65 77 |.Rect...|....view|
|000004e0| 52 65 63 74 3b 0d 09 09 | 6c 6f 6e 67 09 09 09 09 |Rect;...|long....|
|000004f0| 09 09 09 72 65 73 70 6f | 6e 73 65 3b 0d 09 09 42 |...respo|nse;...B|
|00000500| 6f 6f 6c 65 61 6e 09 09 | 09 09 09 09 09 68 61 73 |oolean..|.....has|
|00000510| 43 6f 6c 6f 72 51 75 69 | 63 6b 44 72 61 77 3b 0d |ColorQui|ckDraw;.|
|00000520| 09 09 50 74 72 09 09 09 | 09 09 09 09 09 70 72 69 |..Ptr...|.....pri|
|00000530| 76 61 74 65 53 74 61 73 | 68 3b 0d 09 09 53 74 72 |vateStas|h;...Str|
|00000540| 32 35 35 09 09 09 09 09 | 09 09 77 6f 72 6b 3b 0d |255.....|..work;.|
|00000550| 09 09 0d 09 09 68 61 73 | 43 6f 6c 6f 72 51 75 69 |.....has|ColorQui|
|00000560| 63 6b 44 72 61 77 20 3d | 20 46 41 4c 53 45 3b 0d |ckDraw =| FALSE;.|
|00000570| 09 09 69 66 20 28 47 65 | 73 74 61 6c 74 28 67 65 |..if (Ge|stalt(ge|
|00000580| 73 74 61 6c 74 51 75 69 | 63 6b 64 72 61 77 56 65 |staltQui|ckdrawVe|
|00000590| 72 73 69 6f 6e 2c 20 26 | 72 65 73 70 6f 6e 73 65 |rsion, &|response|
|000005a0| 29 20 3d 3d 20 6e 6f 45 | 72 72 0d 09 09 20 26 26 |) == noE|rr... &&|
|000005b0| 20 72 65 73 70 6f 6e 73 | 65 20 3e 3d 20 67 65 73 | respons|e >= ges|
|000005c0| 74 61 6c 74 38 42 69 74 | 51 44 29 0d 09 09 20 09 |talt8Bit|QD)... .|
|000005d0| 68 61 73 43 6f 6c 6f 72 | 51 75 69 63 6b 44 72 61 |hasColor|QuickDra|
|000005e0| 77 20 3d 20 54 52 55 45 | 3b 0d 09 09 76 69 65 77 |w = TRUE|;...view|
|000005f0| 52 65 63 74 20 3d 20 71 | 64 2e 73 63 72 65 65 6e |Rect = q|d.screen|
|00000600| 42 69 74 73 2e 62 6f 75 | 6e 64 73 3b 0d 09 09 49 |Bits.bou|nds;...I|
|00000610| 6e 73 65 74 52 65 63 74 | 28 26 76 69 65 77 52 65 |nsetRect|(&viewRe|
|00000620| 63 74 2c 20 34 2c 20 34 | 29 3b 0d 09 09 76 69 65 |ct, 4, 4|);...vie|
|00000630| 77 52 65 63 74 2e 74 6f | 70 20 2b 3d 20 28 47 65 |wRect.to|p += (Ge|
|00000640| 74 4d 42 61 72 48 65 69 | 67 68 74 28 29 20 2a 20 |tMBarHei|ght() * |
|00000650| 32 29 3b 0d 09 09 62 72 | 6f 77 73 65 72 50 74 72 |2);...br|owserPtr|
|00000660| 20 3d 20 28 42 72 6f 77 | 73 65 72 50 74 72 29 20 | = (Brow|serPtr) |
|00000670| 4e 65 77 50 74 72 43 6c | 65 61 72 28 73 69 7a 65 |NewPtrCl|ear(size|
|00000680| 6f 66 20 28 42 72 6f 77 | 73 65 72 52 65 63 6f 72 |of (Brow|serRecor|
|00000690| 64 29 29 3b 0d 09 09 69 | 66 20 28 62 72 6f 77 73 |d));...i|f (brows|
|000006a0| 65 72 50 74 72 20 3d 3d | 20 4e 55 4c 4c 29 09 0d |erPtr ==| NULL)..|
|000006b0| 09 09 09 45 78 69 74 54 | 6f 53 68 65 6c 6c 28 29 |...ExitT|oShell()|
|000006c0| 3b 0d 09 09 69 66 20 28 | 46 4f 52 43 45 5f 4d 4f |;...if (|FORCE_MO|
|000006d0| 4e 4f 43 48 52 4f 4d 45 | 20 3d 3d 20 30 20 26 26 |NOCHROME| == 0 &&|
|000006e0| 20 68 61 73 43 6f 6c 6f | 72 51 75 69 63 6b 44 72 | hasColo|rQuickDr|
|000006f0| 61 77 29 20 7b 0d 09 09 | 09 74 68 65 57 69 6e 64 |aw) {...|.theWind|
|00000700| 6f 77 20 3d 20 4e 65 77 | 43 57 69 6e 64 6f 77 28 |ow = New|CWindow(|
|00000710| 0d 09 09 09 09 09 09 28 | 50 74 72 29 20 62 72 6f |.......(|Ptr) bro|
|00000720| 77 73 65 72 50 74 72 2c | 09 09 2f 2a 20 4f 75 72 |wserPtr,|../* Our|
|00000730| 20 64 61 74 61 20 73 74 | 6f 72 61 67 65 09 09 09 | data st|orage...|
|00000740| 09 2a 2f 0d 09 09 09 09 | 09 09 26 76 69 65 77 52 |.*/.....|..&viewR|
|00000750| 65 63 74 2c 09 09 09 09 | 2f 2a 20 53 63 72 65 65 |ect,....|/* Scree|
|00000760| 6e 20 62 6f 75 6e 64 73 | 09 09 09 09 2a 2f 0d 09 |n bounds|....*/..|
|00000770| 09 09 09 09 09 22 5c 70 | 4c 69 73 74 20 69 6e 20 |....."\p|List in |
|00000780| 61 20 48 61 6e 64 6c 65 | 20 69 6e 20 61 20 4c 69 |a Handle| in a Li|
|00000790| 73 74 22 2c 0d 09 09 09 | 09 09 09 46 41 4c 53 45 |st",....|...FALSE|
|000007a0| 2c 09 09 09 09 09 2f 2a | 20 49 6e 69 74 69 61 6c |,...../*| Initial|
|000007b0| 6c 79 20 69 6e 76 69 73 | 69 62 6c 65 09 09 09 2a |ly invis|ible...*|
|000007c0| 2f 0d 09 09 09 09 09 09 | 6e 6f 47 72 6f 77 44 6f |/.......|noGrowDo|
|000007d0| 63 50 72 6f 63 2c 09 09 | 09 2f 2a 20 53 69 6d 70 |cProc,..|./* Simp|
|000007e0| 6c 65 20 64 6f 63 75 6d | 65 6e 74 09 09 09 09 2a |le docum|ent....*|
|000007f0| 2f 0d 09 09 09 09 09 09 | 28 57 69 6e 64 6f 77 50 |/.......|(WindowP|
|00000800| 74 72 29 20 2d 31 4c 2c | 09 09 2f 2a 20 50 75 74 |tr) -1L,|../* Put|
|00000810| 20 69 6e 20 66 72 6f 6e | 74 09 09 09 09 09 2a 2f | in fron|t.....*/|
|00000820| 0d 09 09 09 09 09 09 54 | 52 55 45 2c 09 09 09 09 |.......T|RUE,....|
|00000830| 09 2f 2a 20 48 61 73 20 | 67 6f 20 61 77 61 79 09 |./* Has |go away.|
|00000840| 09 09 09 09 2a 2f 0d 09 | 09 09 09 09 09 30 09 09 |....*/..|.....0..|
|00000850| 09 09 09 09 2f 2a 20 4e | 6f 20 72 65 66 43 6f 6e |..../* N|o refCon|
|00000860| 09 09 09 09 09 2a 2f 0d | 09 09 09 09 09 29 3b 0d |.....*/.|.....);.|
|00000870| 09 09 7d 0d 09 09 65 6c | 73 65 20 7b 0d 09 09 09 |..}...el|se {....|
|00000880| 74 68 65 57 69 6e 64 6f | 77 20 3d 20 4e 65 77 57 |theWindo|w = NewW|
|00000890| 69 6e 64 6f 77 28 0d 09 | 09 09 09 09 09 28 50 74 |indow(..|.....(Pt|
|000008a0| 72 29 20 62 72 6f 77 73 | 65 72 50 74 72 2c 09 09 |r) brows|erPtr,..|
|000008b0| 2f 2a 20 4f 75 72 20 64 | 61 74 61 20 73 74 6f 72 |/* Our d|ata stor|
|000008c0| 61 67 65 09 09 09 09 2a | 2f 0d 09 09 09 09 09 09 |age....*|/.......|
|000008d0| 26 76 69 65 77 52 65 63 | 74 2c 09 09 09 09 2f 2a |&viewRec|t,..../*|
|000008e0| 20 53 63 72 65 65 6e 20 | 62 6f 75 6e 64 73 09 09 | Screen |bounds..|
|000008f0| 09 09 2a 2f 0d 09 09 09 | 09 09 09 22 5c 70 4c 69 |..*/....|..."\pLi|
|00000900| 73 74 20 69 6e 20 61 20 | 48 61 6e 64 6c 65 20 69 |st in a |Handle i|
|00000910| 6e 20 61 20 4c 69 73 74 | 22 2c 0d 09 09 09 09 09 |n a List|",......|
|00000920| 09 46 41 4c 53 45 2c 09 | 09 09 09 09 2f 2a 20 49 |.FALSE,.|..../* I|
|00000930| 6e 69 74 69 61 6c 6c 79 | 20 69 6e 76 69 73 69 62 |nitially| invisib|
|00000940| 6c 65 09 09 09 2a 2f 0d | 09 09 09 09 09 09 6e 6f |le...*/.|......no|
|00000950| 47 72 6f 77 44 6f 63 50 | 72 6f 63 2c 09 09 09 2f |GrowDocP|roc,.../|
|00000960| 2a 20 53 69 6d 70 6c 65 | 20 64 6f 63 75 6d 65 6e |* Simple| documen|
|00000970| 74 09 09 09 09 2a 2f 0d | 09 09 09 09 09 09 28 57 |t....*/.|......(W|
|00000980| 69 6e 64 6f 77 50 74 72 | 29 20 2d 31 4c 2c 09 09 |indowPtr|) -1L,..|
|00000990| 2f 2a 20 50 75 74 20 69 | 6e 20 66 72 6f 6e 74 09 |/* Put i|n front.|
|000009a0| 09 09 09 09 2a 2f 0d 09 | 09 09 09 09 09 54 52 55 |....*/..|.....TRU|
|000009b0| 45 2c 09 09 09 09 09 2f | 2a 20 48 61 73 20 67 6f |E,...../|* Has go|
|000009c0| 20 61 77 61 79 09 09 09 | 09 09 2a 2f 0d 09 09 09 | away...|..*/....|
|000009d0| 09 09 09 30 09 09 09 09 | 09 09 2f 2a 20 4e 6f 20 |...0....|../* No |
|000009e0| 72 65 66 43 6f 6e 09 09 | 09 09 09 2a 2f 0d 09 09 |refCon..|...*/...|
|000009f0| 09 09 09 29 3b 0d 09 09 | 7d 0d 09 09 69 66 20 28 |...);...|}...if (|
|00000a00| 74 68 65 57 69 6e 64 6f | 77 20 3d 3d 20 4e 55 4c |theWindo|w == NUL|
|00000a10| 4c 29 0d 09 09 09 45 78 | 69 74 54 6f 53 68 65 6c |L)....Ex|itToShel|
|00000a20| 6c 28 29 3b 0d 09 09 53 | 65 74 50 6f 72 74 28 74 |l();...S|etPort(t|
|00000a30| 68 65 57 69 6e 64 6f 77 | 29 3b 09 09 09 09 09 09 |heWindow|);......|
|00000a40| 2f 2a 20 44 6f 20 74 68 | 69 73 20 66 69 72 73 74 |/* Do th|is first|
|00000a50| 2c 20 6f 72 20 65 6c 73 | 65 09 09 2a 2f 0d 09 09 |, or els|e..*/...|
|00000a60| 76 69 65 77 52 65 63 74 | 20 3d 20 74 68 65 57 69 |viewRect| = theWi|
|00000a70| 6e 64 6f 77 2d 3e 70 6f | 72 74 52 65 63 74 3b 0d |ndow->po|rtRect;.|
|00000a80| 09 09 54 65 78 74 46 6f | 6e 74 28 6b 4c 69 73 74 |..TextFo|nt(kList|
|00000a90| 46 6f 6e 74 4e 75 6d 62 | 65 72 29 3b 0d 23 69 66 |FontNumb|er);.#if|
|00000aa0| 20 46 4f 52 43 45 5f 48 | 55 47 45 5f 46 4f 4e 54 | FORCE_H|UGE_FONT|
|00000ab0| 0d 09 09 2f 2a 0d 09 09 | 20 2a 20 54 68 69 73 20 |.../*...| * This |
|00000ac0| 6d 61 6b 65 73 20 74 68 | 65 20 66 6f 6e 74 20 73 |makes th|e font s|
|00000ad0| 69 7a 65 20 68 75 67 65 | 20 73 6f 20 74 68 65 20 |ize huge| so the |
|00000ae0| 62 75 74 74 6f 6e 73 20 | 63 61 6e 20 65 61 73 69 |buttons |can easi|
|00000af0| 6c 79 20 62 65 20 70 6c | 61 63 65 64 0d 09 09 20 |ly be pl|aced... |
|00000b00| 2a 20 61 63 72 6f 73 73 | 20 6d 75 6c 74 69 70 6c |* across| multipl|
|00000b10| 65 20 6d 6f 6e 69 74 6f | 72 73 20 69 6e 20 6f 72 |e monito|rs in or|
|00000b20| 64 65 72 20 74 6f 20 74 | 65 73 74 20 74 68 65 20 |der to t|est the |
|00000b30| 44 65 76 69 63 65 4c 6f | 6f 70 20 61 6c 67 6f 72 |DeviceLo|op algor|
|00000b40| 69 74 68 6d 2e 0d 09 09 | 20 2a 2f 0d 09 09 54 65 |ithm....| */...Te|
|00000b50| 78 74 53 69 7a 65 28 28 | 76 69 65 77 52 65 63 74 |xtSize((|viewRect|
|00000b60| 2e 62 6f 74 74 6f 6d 20 | 2d 20 76 69 65 77 52 65 |.bottom |- viewRe|
|00000b70| 63 74 2e 74 6f 70 29 20 | 2f 20 38 29 3b 09 09 2f |ct.top) |/ 8);../|
|00000b80| 2a 20 41 20 68 75 67 65 | 20 66 6f 6e 74 20 73 69 |* A huge| font si|
|00000b90| 7a 65 09 2a 2f 0d 23 65 | 6c 73 65 0d 09 09 54 65 |ze.*/.#e|lse...Te|
|00000ba0| 78 74 53 69 7a 65 28 6b | 4c 69 73 74 46 6f 6e 74 |xtSize(k|ListFont|
|00000bb0| 53 69 7a 65 29 3b 0d 23 | 65 6e 64 69 66 0d 09 09 |Size);.#|endif...|
|00000bc0| 62 72 6f 77 73 65 72 50 | 74 72 2d 3e 74 68 65 4c |browserP|tr->theL|
|00000bd0| 69 73 74 20 3d 20 4e 65 | 77 54 77 69 73 74 44 6f |ist = Ne|wTwistDo|
|00000be0| 77 6e 4c 69 73 74 28 0d | 09 09 09 09 09 26 76 69 |wnList(.|.....&vi|
|00000bf0| 65 77 52 65 63 74 2c 09 | 09 09 09 09 2f 2a 20 57 |ewRect,.|..../* W|
|00000c00| 68 65 72 65 20 69 74 20 | 67 6f 65 73 20 69 6e 20 |here it |goes in |
|00000c10| 74 68 65 20 77 69 6e 64 | 6f 77 09 2a 2f 0d 09 09 |the wind|ow.*/...|
|00000c20| 09 09 09 4e 55 4c 4c 2c | 09 09 09 09 09 09 2f 2a |...NULL,|....../*|
|00000c30| 20 44 72 61 77 20 75 73 | 69 6e 67 20 44 72 61 77 | Draw us|ing Draw|
|00000c40| 54 65 78 74 09 09 09 2a | 2f 0d 09 09 09 09 09 43 |Text...*|/......C|
|00000c50| 68 61 72 57 69 64 74 68 | 28 27 6e 27 29 2c 09 09 |harWidth|('n'),..|
|00000c60| 09 09 2f 2a 20 54 61 62 | 20 69 6e 64 65 6e 74 61 |../* Tab| indenta|
|00000c70| 74 69 6f 6e 20 61 6d 6f | 75 6e 74 09 09 2a 2f 0d |tion amo|unt..*/.|
|00000c80| 09 09 09 09 09 4e 4f 5f | 48 49 4c 49 54 45 5f 53 |.....NO_|HILITE_S|
|00000c90| 45 4c 45 43 54 49 4f 4e | 2c 09 09 2f 2a 20 48 69 |ELECTION|,../* Hi|
|00000ca0| 6c 69 74 65 20 73 65 6c | 65 63 74 69 6f 6e 73 3f |lite sel|ections?|
|00000cb0| 09 09 09 2a 2f 0d 23 69 | 66 20 46 4f 52 43 45 5f |...*/.#i|f FORCE_|
|00000cc0| 52 49 47 48 54 5f 4a 55 | 53 54 49 46 59 0d 09 09 |RIGHT_JU|STIFY...|
|00000cd0| 09 09 09 46 41 4c 53 45 | 0d 23 65 6c 73 65 0d 09 |...FALSE|.#else..|
|00000ce0| 09 09 09 09 28 47 65 74 | 53 79 73 4a 75 73 74 28 |....(Get|SysJust(|
|00000cf0| 29 20 3d 3d 20 30 29 09 | 09 09 2f 2a 20 43 75 72 |) == 0).|../* Cur|
|00000d00| 72 65 6e 74 20 73 79 73 | 74 65 6d 20 6a 75 73 74 |rent sys|tem just|
|00000d10| 69 66 69 63 61 74 69 6f | 6e 09 2a 2f 0d 23 65 6e |ificatio|n.*/.#en|
|00000d20| 64 69 66 0d 09 09 09 09 | 29 3b 0d 09 09 69 66 20 |dif.....|);...if |
|00000d30| 28 62 72 6f 77 73 65 72 | 50 74 72 2d 3e 74 68 65 |(browser|Ptr->the|
|00000d40| 4c 69 73 74 20 3d 3d 20 | 4e 55 4c 4c 29 0d 09 09 |List == |NULL)...|
|00000d50| 09 45 78 69 74 54 6f 53 | 68 65 6c 6c 28 29 3b 09 |.ExitToS|hell();.|
|00000d60| 09 09 09 09 09 2f 2a 20 | 4f 6f 70 73 09 09 09 09 |...../* |Oops....|
|00000d70| 09 09 09 2a 2f 0d 09 09 | 53 68 6f 77 57 69 6e 64 |...*/...|ShowWind|
|00000d80| 6f 77 28 74 68 65 57 69 | 6e 64 6f 77 29 3b 0d 09 |ow(theWi|ndow);..|
|00000d90| 09 53 65 6c 65 63 74 57 | 69 6e 64 6f 77 28 74 68 |.SelectW|indow(th|
|00000da0| 65 57 69 6e 64 6f 77 29 | 3b 0d 09 09 67 55 70 64 |eWindow)|;...gUpd|
|00000db0| 61 74 65 4d 65 6e 75 73 | 4e 65 65 64 65 64 20 3d |ateMenus|Needed =|
|00000dc0| 20 54 52 55 45 3b 0d 09 | 09 2b 2b 67 4f 70 65 6e | TRUE;..|.++gOpen|
|00000dd0| 57 69 6e 64 6f 77 43 6f | 75 6e 74 3b 0d 09 09 53 |WindowCo|unt;...S|
|00000de0| 65 74 43 75 72 73 6f 72 | 28 2a 47 65 74 43 75 72 |etCursor|(*GetCur|
|00000df0| 73 6f 72 28 77 61 74 63 | 68 43 75 72 73 6f 72 29 |sor(watc|hCursor)|
|00000e00| 29 3b 0d 09 09 2f 2a 0d | 09 09 20 2a 20 42 65 63 |);.../*.|.. * Bec|
|00000e10| 61 75 73 65 20 45 6e 75 | 6d 65 72 61 74 65 48 46 |ause Enu|merateHF|
|00000e20| 53 43 61 74 61 6c 6f 67 | 20 63 61 6e 20 61 62 73 |SCatalog| can abs|
|00000e30| 6f 72 62 20 61 6c 6c 20 | 61 76 61 69 6c 61 62 6c |orb all |availabl|
|00000e40| 65 20 6d 65 6d 6f 72 79 | 20 69 66 20 79 6f 75 0d |e memory| if you.|
|00000e50| 09 09 20 2a 20 63 61 6c | 6c 20 69 74 20 66 6f 72 |.. * cal|l it for|
|00000e60| 20 61 20 76 65 72 79 20 | 6c 61 72 67 65 20 64 69 | a very |large di|
|00000e70| 73 6b 20 28 61 73 6b 20 | 6d 65 20 68 6f 77 20 49 |sk (ask |me how I|
|00000e80| 20 6b 6e 6f 77 29 2c 20 | 77 65 20 67 72 61 62 20 | know), |we grab |
|00000e90| 61 20 63 68 75 6e 6b 0d | 09 09 20 2a 20 6f 66 20 |a chunk.|.. * of |
|00000ea0| 6d 65 6d 6f 72 79 20 74 | 68 61 74 20 77 65 20 72 |memory t|hat we r|
|00000eb0| 65 73 74 6f 72 65 20 62 | 65 66 6f 72 65 20 62 75 |estore b|efore bu|
|00000ec0| 69 6c 64 69 6e 67 20 61 | 6e 64 20 64 69 73 70 6c |ilding a|nd displ|
|00000ed0| 61 79 69 6e 67 20 74 68 | 65 20 76 69 73 69 62 6c |aying th|e visibl|
|00000ee0| 65 2e 0d 09 09 20 2a 20 | 54 68 69 73 20 69 73 6e |e.... * |This isn|
|00000ef0| 27 74 20 61 20 72 65 61 | 6c 6c 79 20 67 72 65 61 |'t a rea|lly grea|
|00000f00| 74 20 73 6f 6c 75 74 69 | 6f 6e 2c 20 62 75 74 20 |t soluti|on, but |
|00000f10| 69 74 20 77 69 6c 6c 20 | 64 6f 20 66 6f 72 20 6e |it will |do for n|
|00000f20| 6f 77 2e 0d 09 09 20 2a | 2f 0d 09 09 70 72 69 76 |ow.... *|/...priv|
|00000f30| 61 74 65 53 74 61 73 68 | 20 3d 20 4e 65 77 50 74 |ateStash| = NewPt|
|00000f40| 72 28 33 32 37 36 38 4c | 29 3b 0d 09 09 69 66 20 |r(32768L|);...if |
|00000f50| 28 70 72 69 76 61 74 65 | 53 74 61 73 68 20 21 3d |(private|Stash !=|
|00000f60| 20 4e 55 4c 4c 29 20 7b | 0d 09 09 09 62 72 6f 77 | NULL) {|....brow|
|00000f70| 73 65 72 50 74 72 2d 3e | 6c 69 73 74 48 65 61 64 |serPtr->|listHead|
|00000f80| 20 3d 20 45 6e 75 6d 65 | 72 61 74 65 48 46 53 43 | = Enume|rateHFSC|
|00000f90| 61 74 61 6c 6f 67 28 0d | 09 09 09 09 62 72 6f 77 |atalog(.|....brow|
|00000fa0| 73 65 72 50 74 72 2d 3e | 74 68 65 4c 69 73 74 2c |serPtr->|theList,|
|00000fb0| 09 09 09 2f 2a 20 53 74 | 6f 72 65 20 69 6e 20 74 |.../* St|ore in t|
|00000fc0| 68 69 73 20 6c 69 73 74 | 09 09 09 2a 2f 0d 09 09 |his list|...*/...|
|00000fd0| 09 09 30 2c 09 09 09 09 | 09 09 09 09 2f 2a 20 49 |..0,....|..../* I|
|00000fe0| 6e 69 74 69 61 6c 20 69 | 6e 64 65 6e 74 09 09 09 |nitial i|ndent...|
|00000ff0| 09 2a 2f 0d 09 09 09 09 | 30 2c 09 09 09 09 09 09 |.*/.....|0,......|
|00001000| 09 09 2f 2a 20 44 6f 20 | 63 75 72 72 65 6e 74 20 |../* Do |current |
|00001010| 76 6f 6c 75 6d 65 09 09 | 09 2a 2f 0d 09 09 09 09 |volume..|.*/.....|
|00001020| 66 73 52 74 44 69 72 49 | 44 09 09 09 09 09 09 2f |fsRtDirI|D....../|
|00001030| 2a 20 53 74 61 72 74 20 | 61 74 20 74 68 65 20 72 |* Start |at the r|
|00001040| 6f 6f 74 20 64 69 72 65 | 63 74 6f 72 79 09 2a 2f |oot dire|ctory.*/|
|00001050| 0d 09 09 09 29 3b 0d 09 | 09 09 44 69 73 70 6f 73 |....);..|..Dispos|
|00001060| 65 50 74 72 28 70 72 69 | 76 61 74 65 53 74 61 73 |ePtr(pri|vateStas|
|00001070| 68 29 3b 0d 09 09 7d 0d | 09 09 2f 2a 0d 09 09 20 |h);...}.|../*... |
|00001080| 2a 20 54 68 65 20 63 61 | 74 61 6c 6f 67 20 68 61 |* The ca|talog ha|
|00001090| 73 20 62 65 65 6e 20 65 | 6e 75 6d 65 72 61 74 65 |s been e|numerate|
|000010a0| 64 20 61 6e 64 20 74 68 | 65 20 6c 69 73 74 20 6f |d and th|e list o|
|000010b0| 66 20 66 69 6c 65 73 20 | 61 6e 64 20 66 6f 6c 64 |f files |and fold|
|000010c0| 65 72 73 0d 09 09 20 2a | 20 63 6f 6e 73 74 72 75 |ers... *| constru|
|000010d0| 63 74 65 64 2e 20 44 69 | 73 70 6c 61 79 20 74 68 |cted. Di|splay th|
|000010e0| 65 20 6e 75 6d 62 65 72 | 20 6f 66 20 66 69 6c 65 |e number| of file|
|000010f0| 73 2f 66 6f 6c 64 65 72 | 73 20 69 6e 20 74 68 65 |s/folder|s in the|
|00001100| 20 57 69 6e 64 6f 77 20 | 74 69 74 6c 65 0d 09 09 | Window |title...|
|00001110| 20 2a 20 61 6e 64 20 64 | 69 73 70 6c 61 79 20 74 | * and d|isplay t|
|00001120| 68 65 20 69 6e 69 74 69 | 61 6c 20 6c 69 73 74 2e |he initi|al list.|
|00001130| 0d 09 09 20 2a 2f 0d 09 | 09 4e 75 6d 54 6f 53 74 |... */..|.NumToSt|
|00001140| 72 69 6e 67 28 43 6f 75 | 6e 74 4c 69 73 74 45 6c |ring(Cou|ntListEl|
|00001150| 65 6d 65 6e 74 73 28 62 | 72 6f 77 73 65 72 50 74 |ements(b|rowserPt|
|00001160| 72 2d 3e 6c 69 73 74 48 | 65 61 64 29 2c 20 77 6f |r->listH|ead), wo|
|00001170| 72 6b 29 3b 0d 09 09 70 | 73 74 72 63 61 74 28 77 |rk);...p|strcat(w|
|00001180| 6f 72 6b 2c 20 22 5c 70 | 20 2d 20 46 69 6c 65 73 |ork, "\p| - Files|
|00001190| 20 61 6e 64 20 66 6f 6c | 64 65 72 73 20 66 6f 75 | and fol|ders fou|
|000011a0| 6e 64 22 29 3b 0d 09 09 | 53 65 74 57 54 69 74 6c |nd");...|SetWTitl|
|000011b0| 65 28 74 68 65 57 69 6e | 64 6f 77 2c 20 77 6f 72 |e(theWin|dow, wor|
|000011c0| 6b 29 3b 0d 09 09 43 72 | 65 61 74 65 56 69 73 69 |k);...Cr|eateVisi|
|000011d0| 62 6c 65 4c 69 73 74 28 | 62 72 6f 77 73 65 72 50 |bleList(|browserP|
|000011e0| 74 72 2d 3e 74 68 65 4c | 69 73 74 2c 20 62 72 6f |tr->theL|ist, bro|
|000011f0| 77 73 65 72 50 74 72 2d | 3e 6c 69 73 74 48 65 61 |wserPtr-|>listHea|
|00001200| 64 29 3b 0d 7d 0d 0d 2f | 2a 0d 20 2a 20 44 69 73 |d);.}../|*. * Dis|
|00001210| 70 6f 73 65 42 72 6f 77 | 73 65 72 0d 20 2a 20 54 |poseBrow|ser. * T|
|00001220| 68 65 20 75 73 65 72 20 | 63 6c 69 63 6b 65 64 20 |he user |clicked |
|00001230| 6f 6e 20 74 68 65 20 63 | 6c 6f 73 65 72 2e 20 44 |on the c|loser. D|
|00001240| 69 73 70 6f 73 65 20 6f | 66 20 74 68 65 20 77 69 |ispose o|f the wi|
|00001250| 6e 64 6f 77 20 61 6e 64 | 20 69 74 73 20 63 6f 6e |ndow and| its con|
|00001260| 74 65 6e 74 73 2e 0d 20 | 2a 2f 0d 76 6f 69 64 0d |tents.. |*/.void.|
|00001270| 44 69 73 70 6f 73 65 42 | 72 6f 77 73 65 72 28 0d |DisposeB|rowser(.|
|00001280| 09 09 72 65 67 69 73 74 | 65 72 20 42 72 6f 77 73 |..regist|er Brows|
|00001290| 65 72 50 74 72 09 09 09 | 09 62 72 6f 77 73 65 72 |erPtr...|.browser|
|000012a0| 50 74 72 0d 09 29 0d 7b | 0d 09 09 44 69 73 70 6f |Ptr..).{|...Dispo|
|000012b0| 73 65 54 77 69 73 74 44 | 6f 77 6e 4c 69 73 74 28 |seTwistD|ownList(|
|000012c0| 62 72 6f 77 73 65 72 50 | 74 72 2d 3e 74 68 65 4c |browserP|tr->theL|
|000012d0| 69 73 74 29 3b 0d 09 09 | 44 69 73 70 6f 73 65 54 |ist);...|DisposeT|
|000012e0| 77 69 73 74 44 6f 77 6e | 48 64 6c 28 62 72 6f 77 |wistDown|Hdl(brow|
|000012f0| 73 65 72 50 74 72 2d 3e | 6c 69 73 74 48 65 61 64 |serPtr->|listHead|
|00001300| 2c 20 4e 55 4c 4c 2c 20 | 30 29 3b 0d 09 09 43 6c |, NULL, |0);...Cl|
|00001310| 6f 73 65 57 69 6e 64 6f | 77 28 28 57 69 6e 64 6f |oseWindo|w((Windo|
|00001320| 77 50 74 72 29 20 26 62 | 72 6f 77 73 65 72 50 74 |wPtr) &b|rowserPt|
|00001330| 72 2d 3e 74 68 65 57 69 | 6e 64 6f 77 29 3b 0d 09 |r->theWi|ndow);..|
|00001340| 09 44 69 73 70 6f 73 65 | 50 74 72 28 28 50 74 72 |.Dispose|Ptr((Ptr|
|00001350| 29 20 62 72 6f 77 73 65 | 72 50 74 72 29 3b 0d 09 |) browse|rPtr);..|
|00001360| 09 67 55 70 64 61 74 65 | 4d 65 6e 75 73 4e 65 65 |.gUpdate|MenusNee|
|00001370| 64 65 64 20 3d 20 54 52 | 55 45 3b 0d 09 09 2d 2d |ded = TR|UE;...--|
|00001380| 67 4f 70 65 6e 57 69 6e | 64 6f 77 43 6f 75 6e 74 |gOpenWin|dowCount|
|00001390| 3b 0d 7d 0d 0d 2f 2a 0d | 20 2a 20 41 63 74 69 76 |;.}../*.| * Activ|
|000013a0| 61 74 65 42 72 6f 77 73 | 65 72 0d 20 2a 20 54 68 |ateBrows|er. * Th|
|000013b0| 69 73 20 69 73 20 63 61 | 6c 6c 65 64 20 6f 6e 20 |is is ca|lled on |
|000013c0| 61 63 74 69 76 61 74 65 | 20 61 6e 64 20 64 65 61 |activate| and dea|
|000013d0| 63 74 69 76 61 74 65 20 | 28 6f 72 20 73 75 73 70 |ctivate |(or susp|
|000013e0| 65 6e 64 2f 72 65 73 75 | 6d 65 29 20 65 76 65 6e |end/resu|me) even|
|000013f0| 74 73 20 74 6f 20 65 6e | 61 62 6c 65 0d 20 2a 20 |ts to en|able. * |
|00001400| 6f 72 20 64 69 73 61 62 | 6c 65 20 74 68 65 20 77 |or disab|le the w|
|00001410| 69 6e 64 6f 77 20 63 6f | 6e 74 65 6e 74 2e 0d 20 |indow co|ntent.. |
|00001420| 2a 2f 0d 76 6f 69 64 0d | 41 63 74 69 76 61 74 65 |*/.void.|Activate|
|00001430| 42 72 6f 77 73 65 72 28 | 0d 09 09 72 65 67 69 73 |Browser(|...regis|
|00001440| 74 65 72 20 42 72 6f 77 | 73 65 72 50 74 72 09 09 |ter Brow|serPtr..|
|00001450| 09 09 62 72 6f 77 73 65 | 72 50 74 72 2c 0d 09 09 |..browse|rPtr,...|
|00001460| 42 6f 6f 6c 65 61 6e 09 | 09 09 09 09 09 09 61 63 |Boolean.|......ac|
|00001470| 74 69 76 61 74 69 6e 67 | 0d 09 29 0d 7b 0d 09 09 |tivating|..).{...|
|00001480| 4c 41 63 74 69 76 61 74 | 65 28 61 63 74 69 76 61 |LActivat|e(activa|
|00001490| 74 69 6e 67 2c 20 62 72 | 6f 77 73 65 72 50 74 72 |ting, br|owserPtr|
|000014a0| 2d 3e 74 68 65 4c 69 73 | 74 29 3b 0d 7d 0d 0d 2f |->theLis|t);.}../|
|000014b0| 2a 0d 20 2a 20 44 6f 57 | 69 6e 64 6f 77 4b 65 79 |*. * DoW|indowKey|
|000014c0| 44 6f 77 6e 0d 20 2a 2f | 0d 76 6f 69 64 0d 44 6f |Down. */|.void.Do|
|000014d0| 57 69 6e 64 6f 77 4b 65 | 79 44 6f 77 6e 28 0d 09 |WindowKe|yDown(..|
|000014e0| 09 72 65 67 69 73 74 65 | 72 20 42 72 6f 77 73 65 |.registe|r Browse|
|000014f0| 72 50 74 72 09 09 09 09 | 62 72 6f 77 73 65 72 50 |rPtr....|browserP|
|00001500| 74 72 0d 09 29 0d 7b 0d | 23 70 72 61 67 6d 61 20 |tr..).{.|#pragma |
|00001510| 75 6e 75 73 65 64 20 28 | 62 72 6f 77 73 65 72 50 |unused (|browserP|
|00001520| 74 72 29 0d 0d 09 09 2f | 2a 20 4e 6f 74 68 69 6e |tr)..../|* Nothin|
|00001530| 67 20 68 61 70 70 65 6e | 73 20 68 65 72 65 20 2a |g happen|s here *|
|00001540| 2f 0d 7d 0d 0d 2f 2a 0d | 20 2a 20 44 6f 43 6f 6e |/.}../*.| * DoCon|
|00001550| 74 65 6e 74 43 6c 69 63 | 6b 0d 20 2a 20 43 6c 69 |tentClic|k. * Cli|
|00001560| 63 6b 20 69 6e 20 74 68 | 65 20 77 69 6e 64 6f 77 |ck in th|e window|
|00001570| 2e 20 54 68 69 73 20 66 | 75 6e 63 74 69 6f 6e 20 |. This f|unction |
|00001580| 64 65 63 69 64 65 73 20 | 77 68 69 63 68 20 65 6c |decides |which el|
|00001590| 65 6d 65 6e 74 20 72 65 | 63 65 69 76 65 64 20 74 |ement re|ceived t|
|000015a0| 68 65 20 63 6c 69 63 6b | 20 61 6e 64 0d 20 2a 20 |he click| and. * |
|000015b0| 63 61 6c 6c 73 20 74 68 | 65 20 72 65 71 75 69 73 |calls th|e requis|
|000015c0| 69 74 65 20 63 6c 69 63 | 6b 20 68 61 6e 64 6c 65 |ite clic|k handle|
|000015d0| 72 2e 20 49 6e 20 74 68 | 69 73 20 65 78 61 6d 70 |r. In th|is examp|
|000015e0| 6c 65 2c 20 77 65 20 6e | 65 65 64 20 6f 6e 6c 79 |le, we n|eed only|
|000015f0| 20 64 65 61 6c 20 77 69 | 74 68 0d 20 2a 20 74 68 | deal wi|th. * th|
|00001600| 65 20 74 77 69 73 74 2d | 64 6f 77 6e 20 6c 69 73 |e twist-|down lis|
|00001610| 74 2e 0d 20 2a 2f 0d 76 | 6f 69 64 0d 44 6f 43 6f |t.. */.v|oid.DoCo|
|00001620| 6e 74 65 6e 74 43 6c 69 | 63 6b 28 0d 09 09 72 65 |ntentCli|ck(...re|
|00001630| 67 69 73 74 65 72 20 42 | 72 6f 77 73 65 72 50 74 |gister B|rowserPt|
|00001640| 72 09 09 09 09 62 72 6f | 77 73 65 72 50 74 72 0d |r....bro|wserPtr.|
|00001650| 09 29 0d 7b 0d 09 09 43 | 65 6c 6c 09 09 09 09 09 |.).{...C|ell.....|
|00001660| 09 09 74 68 65 43 65 6c | 6c 3b 0d 09 09 54 77 69 |..theCel|l;...Twi|
|00001670| 73 74 44 6f 77 6e 43 6c | 69 63 6b 53 74 61 74 65 |stDownCl|ickState|
|00001680| 09 09 09 09 63 6c 69 63 | 6b 53 74 61 74 65 3b 0d |....clic|kState;.|
|00001690| 09 09 0d 09 09 63 6c 69 | 63 6b 53 74 61 74 65 20 |.....cli|ckState |
|000016a0| 3d 20 44 6f 54 77 69 73 | 74 44 6f 77 6e 43 6c 69 |= DoTwis|tDownCli|
|000016b0| 63 6b 28 62 72 6f 77 73 | 65 72 50 74 72 2d 3e 74 |ck(brows|erPtr->t|
|000016c0| 68 65 4c 69 73 74 2c 20 | 26 67 45 76 65 6e 74 52 |heList, |&gEventR|
|000016d0| 65 63 6f 72 64 2c 20 26 | 74 68 65 43 65 6c 6c 29 |ecord, &|theCell)|
|000016e0| 3b 0d 09 09 73 77 69 74 | 63 68 20 28 63 6c 69 63 |;...swit|ch (clic|
|000016f0| 6b 53 74 61 74 65 29 20 | 7b 0d 09 09 63 61 73 65 |kState) |{...case|
|00001700| 20 6b 54 77 69 73 74 44 | 6f 77 6e 4e 6f 74 49 6e | kTwistD|ownNotIn|
|00001710| 4c 69 73 74 3a 09 09 09 | 2f 2a 20 4e 6f 74 20 69 |List:...|/* Not i|
|00001720| 6e 20 6c 69 73 74 20 76 | 69 65 77 20 72 65 63 74 |n list v|iew rect|
|00001730| 61 6e 67 6c 65 09 09 2a | 2f 0d 09 09 63 61 73 65 |angle..*|/...case|
|00001740| 20 6b 54 77 69 73 74 44 | 6f 77 6e 4e 6f 43 6c 69 | kTwistD|ownNoCli|
|00001750| 63 6b 3a 09 09 09 09 2f | 2a 20 53 63 72 6f 6c 6c |ck:..../|* Scroll|
|00001760| 20 62 61 72 20 6f 72 20 | 75 73 65 72 20 63 68 61 | bar or |user cha|
|00001770| 6e 67 65 64 20 6d 69 6e | 64 09 2a 2f 0d 09 09 09 |nged min|d.*/....|
|00001780| 62 72 65 61 6b 3b 09 09 | 09 09 09 09 09 2f 2a 20 |break;..|...../* |
|00001790| 49 67 6e 6f 72 65 20 74 | 68 69 73 20 63 6c 69 63 |Ignore t|his clic|
|000017a0| 6b 09 09 09 09 2a 2f 0d | 09 09 63 61 73 65 20 6b |k....*/.|..case k|
|000017b0| 54 77 69 73 74 44 6f 77 | 6e 42 75 74 74 6f 6e 43 |TwistDow|nButtonC|
|000017c0| 6c 69 63 6b 3a 09 09 09 | 2f 2a 20 43 6c 69 63 6b |lick:...|/* Click|
|000017d0| 65 64 20 6f 6e 20 65 78 | 70 61 6e 73 69 6f 6e 20 |ed on ex|pansion |
|000017e0| 62 75 74 74 6f 6e 09 09 | 2a 2f 0d 09 09 09 62 72 |button..|*/....br|
|000017f0| 65 61 6b 3b 09 09 09 09 | 09 09 09 2f 2a 20 44 6f |eak;....|.../* Do|
|00001800| 6e 65 20 66 6f 72 20 75 | 73 09 09 09 09 09 09 2a |ne for u|s......*|
|00001810| 2f 0d 09 09 63 61 73 65 | 20 6b 54 77 69 73 74 44 |/...case| kTwistD|
|00001820| 6f 77 6e 43 6c 69 63 6b | 3a 09 09 09 09 2f 2a 20 |ownClick|:..../* |
|00001830| 53 69 6e 67 6c 65 2d 63 | 6c 69 63 6b 20 6f 6e 20 |Single-c|lick on |
|00001840| 6c 69 73 74 20 64 61 74 | 75 6d 09 09 2a 2f 0d 09 |list dat|um..*/..|
|00001850| 09 63 61 73 65 20 6b 54 | 77 69 73 74 44 6f 77 6e |.case kT|wistDown|
|00001860| 44 6f 75 62 6c 65 43 6c | 69 63 6b 3a 09 09 09 2f |DoubleCl|ick:.../|
|00001870| 2a 20 44 6f 75 62 6c 65 | 2d 63 6c 69 63 6b 20 6f |* Double|-click o|
|00001880| 6e 20 6c 69 73 74 20 64 | 61 74 75 6d 09 09 2a 2f |n list d|atum..*/|
|00001890| 0d 09 09 09 62 72 65 61 | 6b 3b 09 09 09 09 09 09 |....brea|k;......|
|000018a0| 09 2f 2a 20 49 67 6e 6f | 72 65 20 74 68 65 73 65 |./* Igno|re these|
|000018b0| 20 63 6c 69 63 6b 73 09 | 09 09 09 2a 2f 0d 09 09 | clicks.|...*/...|
|000018c0| 7d 0d 7d 0d 0d 2f 2a 0d | 20 2a 20 55 70 64 61 74 |}.}../*.| * Updat|
|000018d0| 65 42 72 6f 77 73 65 72 | 57 69 6e 6f 77 0d 20 2a |eBrowser|Winow. *|
|000018e0| 20 50 72 6f 63 65 73 73 | 20 61 6e 20 75 70 64 61 | Process| an upda|
|000018f0| 74 65 20 65 76 65 6e 74 | 20 69 6e 20 74 68 69 73 |te event| in this|
|00001900| 20 77 69 6e 64 6f 77 2e | 0d 20 2a 2f 0d 76 6f 69 | window.|. */.voi|
|00001910| 64 0d 55 70 64 61 74 65 | 42 72 6f 77 73 65 72 57 |d.Update|BrowserW|
|00001920| 69 6e 64 6f 77 28 0d 09 | 09 72 65 67 69 73 74 65 |indow(..|.registe|
|00001930| 72 20 42 72 6f 77 73 65 | 72 50 74 72 09 09 09 09 |r Browse|rPtr....|
|00001940| 62 72 6f 77 73 65 72 50 | 74 72 2c 0d 09 09 52 67 |browserP|tr,...Rg|
|00001950| 6e 48 61 6e 64 6c 65 09 | 09 09 09 09 09 75 70 64 |nHandle.|.....upd|
|00001960| 61 74 65 52 67 6e 0d 09 | 29 0d 7b 0d 09 09 52 65 |ateRgn..|).{...Re|
|00001970| 63 74 09 09 09 09 09 09 | 09 76 69 65 77 52 65 63 |ct......|.viewRec|
|00001980| 74 3b 0d 09 09 0d 09 09 | 76 69 65 77 52 65 63 74 |t;......|viewRect|
|00001990| 20 3d 20 28 2a 2a 28 62 | 72 6f 77 73 65 72 50 74 | = (**(b|rowserPt|
|000019a0| 72 2d 3e 74 68 65 4c 69 | 73 74 29 29 2e 72 56 69 |r->theLi|st)).rVi|
|000019b0| 65 77 3b 0d 09 09 49 6e | 73 65 74 52 65 63 74 28 |ew;...In|setRect(|
|000019c0| 26 76 69 65 77 52 65 63 | 74 2c 20 2d 31 2c 20 2d |&viewRec|t, -1, -|
|000019d0| 31 29 3b 0d 09 09 46 72 | 61 6d 65 52 65 63 74 28 |1);...Fr|ameRect(|
|000019e0| 26 76 69 65 77 52 65 63 | 74 29 3b 0d 09 09 4c 55 |&viewRec|t);...LU|
|000019f0| 70 64 61 74 65 28 75 70 | 64 61 74 65 52 67 6e 2c |pdate(up|dateRgn,|
|00001a00| 20 62 72 6f 77 73 65 72 | 50 74 72 2d 3e 74 68 65 | browser|Ptr->the|
|00001a10| 4c 69 73 74 29 3b 0d 7d | 0d 0d 00 00 00 00 00 00 |List);.}|........|
|00001a20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001a30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001a40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001a50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001a60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001a70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001a80| 00 00 01 00 00 00 02 d2 | 00 00 01 d2 00 00 00 a6 |........|........|
|00001a90| 09 09 44 72 61 77 46 6f | 63 75 73 52 65 63 74 28 |..DrawFo|cusRect(|
|00001aa0| 64 62 70 2c 20 6c 69 73 | 74 48 61 6e 64 6c 65 2c |dbp, lis|tHandle,|
|00001ab0| 0f 57 69 6e 64 6f 77 4d | 61 6e 61 67 65 72 2e 63 |.WindowM|anager.c|
|00001ac0| 02 00 00 00 54 45 58 54 | 4b 41 48 4c 01 00 00 8c |....TEXT|KAHL....|
|00001ad0| 00 00 54 45 58 54 4b 41 | 48 4c 01 00 00 8c 00 00 |..TEXTKA|HL......|
|00001ae0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001af0| 00 00 a7 ff 96 e2 00 00 | 19 9a 00 00 03 78 02 3d |........|.....x.=|
|00001b00| 00 50 00 20 01 dd 02 3d | a7 ee f4 99 00 00 54 bf |.P. ...=|......T.|
|00001b10| 00 00 54 bf 00 00 52 55 | 01 00 00 00 00 1e 00 50 |..T...RU|.......P|
|00001b20| 00 20 01 dd 02 3d 00 50 | 00 20 01 dd 02 3d 00 00 |. ...=.P|. ...=..|
|00001b30| 52 55 00 00 00 00 00 00 | 00 00 00 00 00 00 00 04 |RU......|........|
|00001b40| 00 06 00 04 00 00 00 0a | 00 0a 07 43 6f 75 72 69 |........|...Couri|
|00001b50| 65 72 00 00 01 00 00 00 | 02 d2 00 00 01 d2 00 00 |er......|........|
|00001b60| 00 a6 00 35 56 68 0e 54 | 00 00 00 1c 00 a6 00 04 |...5Vh.T|........|
|00001b70| 42 4b 50 54 00 01 00 2a | 44 54 56 55 00 01 00 42 |BKPT...*|DTVU...B|
|00001b80| 00 00 00 0a 00 00 07 15 | ff ff 00 00 00 00 00 00 |........|........|
|00001b90| 00 0a 00 00 05 a5 ff ff | 00 00 00 00 00 00 00 7e |........|.......~|
|00001ba0| 00 03 00 36 00 00 11 51 | 00 8d 00 30 b5 f4 80 00 |...6...Q|...0....|
|00001bb0| 01 a4 01 aa 02 16 02 7b | 94 20 00 00 00 00 00 00 |.......{|. ......|
|00001bc0| 17 2a 2a 44 42 52 2e 69 | 63 6f 6e 50 6f 70 75 70 |.**DBR.i|conPopup|
|00001bd0| 43 6f 6e 74 72 6f 6c 20 | 00 24 00 00 11 51 00 8d |Control |.$...Q..|
|00001be0| 00 30 b5 fc 00 00 15 2a | 44 42 52 2e 69 63 6f 6e |.0.....*|DBR.icon|
|00001bf0| 50 6f 70 75 70 43 6f 6e | 74 72 6f 6c 00 22 00 00 |PopupCon|trol."..|
|00001c00| 11 51 00 8d 00 30 b7 80 | 80 00 01 b8 01 ae 02 2a |.Q...0..|.......*|
|00001c10| 02 7f 94 20 00 00 00 00 | 00 00 03 44 42 52 00 00 |... ....|...DBR..|
|00001c20| 00 ac 00 05 00 24 00 00 | 18 09 00 d2 00 3f d2 d8 |.....$..|.....?..|
|00001c30| 00 00 15 2a 4c 4f 43 41 | 4c 5f 52 49 44 2e 72 65 |...*LOCA|L_RID.re|
|00001c40| 63 6f 72 64 4e 61 6d 65 | 00 18 00 00 18 09 00 d2 |cordName|........|
|00001c50| 00 3f d4 ec 00 00 09 4c | 4f 43 41 4c 5f 52 49 44 |.?.....L|OCAL_RID|
|00001c60| 00 2a 00 00 18 09 00 d2 | 00 3f d2 bc 00 00 1b 28 |.*......|.?.....(|
|00001c70| 2a 44 42 52 2e 73 65 6c | 65 63 74 65 64 44 53 53 |*DBR.sel|ectedDSS|
|00001c80| 70 65 63 29 2e 64 61 74 | 61 20 00 22 00 00 18 09 |pec).dat|a ."....|
|00001c90| 00 d2 00 3f d3 0c 00 00 | 13 2a 44 42 52 2e 73 65 |...?....|.*DBR.se|
|00001ca0| 6c 65 63 74 65 64 44 53 | 53 70 65 63 00 22 00 00 |lectedDS|Spec."..|
|00001cb0| 18 09 00 d2 00 3f d3 6c | 00 00 13 44 42 52 2e 73 |.....?.l|...DBR.s|
|00001cc0| 65 6c 65 63 74 65 64 44 | 53 53 70 65 63 20 00 00 |electedD|SSpec ..|
|00001cd0| 00 1e 00 64 00 1c 01 dd | 02 3d 00 64 00 1c 01 dd |...d....|.=.d....|
|00001ce0| 02 3d 00 00 02 39 00 00 | 00 00 00 00 00 00 00 00 |.=...9..|........|
|00001cf0| 00 00 00 48 00 0a 43 6f | 75 72 69 65 72 00 00 00 |...H..Co|urier...|
|00001d00| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001d10| 00 00 00 00 00 00 00 03 | 00 04 00 64 00 1c 01 dd |........|...d....|
|00001d20| 02 3d 00 64 00 1c 01 dd | 02 3d a9 6a b4 9f 00 00 |.=.d....|.=.j....|
|00001d30| 11 0a 00 00 11 1f 00 00 | 10 fa 01 00 00 00 00 04 |........|........|
|00001d40| 00 06 00 04 00 00 00 0a | 00 0a 07 43 6f 75 72 69 |........|...Couri|
|00001d50| 65 72 00 00 01 00 00 00 | 02 d2 00 00 01 d2 00 00 |er......|........|
|00001d60| 00 a6 00 a7 b5 a8 1d 62 | 00 00 00 1c 00 a6 00 04 |.......b|........|
|00001d70| 42 4b 50 54 00 01 00 2a | 44 54 56 55 00 01 00 42 |BKPT...*|DTVU...B|
|00001d80| 4d 50 53 52 00 01 00 5a | 45 54 41 42 00 00 00 72 |MPSR...Z|ETAB...r|
|00001d90| 45 46 4e 54 00 00 00 7e | 7f 78 ff ff 00 00 00 00 |EFNT...~|.x......|
|00001da0| 00 00 00 00 71 7c ff ff | 00 00 00 0e 00 00 00 00 |....q|..|........|
|00001db0| 6a c7 ff ff 00 00 00 1c | 00 00 00 00 42 3d ff ff |j.......|....B=..|
|00001dc0| 00 00 00 9e 00 00 00 00 | 03 f0 ff ff 00 00 01 4e |........|.......N|
|00001dd0| 00 00 00 00 03 ed ff ff | 00 00 01 70 00 00 00 00 |........|...p....|
|00001de0| 03 ec ff ff 00 00 01 bc | 00 a7 b2 4c 03 eb ff ff |........|...L....|
|00001df0| 00 00 01 c4 00 a7 b2 60 | 00 00 00 00 00 00 00 00 |.......`|........|
+--------+-------------------------+-------------------------+--------+--------+